Copyright: DDrop.vbx\n1994 by Winefred Washington


Drag-and-Drop Control
Drag-and-Drop

Description	The Drag-and-Drop control is an object which can accept files when they are

dragged onto its parent window.

File Name	DDROP.VBX

Object Type	DDROP

Remarks	DDrop is a shareware VBX control for use with VB 3.0.  You may use the unregistered

version to evaluate the control.  If you wish to distribute the control with a program you

 create, you must register your copy.  If you choose to register, you will receive the

source and two versions of  DDrop, a developer's version, and a run-time-only version

for distributing with your programs.  Neither version contains the "unregistered" pop-up.

How to Use DDrop

Registering DDrop

_______________________________________________________________

Distribution Note  You may create and distribute only applications which use

the registered version of DDROP.VBX.  You should install DDROP.VBX in the user's

Microsoft Windows directory.

_______________________________________________________________

About	The Drag-and-Drop control was written by Winefred Washington.  For additional

information:

Winefred Washington

14 Greenbrook Lane

Kingston, NY  12401

CompuServe ID:  72070, 3713

Properties and Events

All properties and events are listed in the following tables.

Properties

_____________________________________________________________

Enabled	Index	Left	Name

Parent	Tag	Top

Events

-----------------------------------------------------------------------------------------------------------

DropFile	DropFileBegin	DropFileEnd

-----------------------------------------------------------------------------------------------------------


DropFile Event

Syntax	Sub DDrop_DropFile ([Index As Integer] X As Single, Y As Single, Filename As String)

Remarks	The DropFile event uses these arguments.

Argument	Description

Index	Uniquely identifies a DDrop control if it is in a control array.

X,Y	Location of mouse pointer when files were dropped.

Filename	Name of filename dropped on container control.


DropFileBegin Event

Syntax	Sub DDrop_DropFileBegin ([Index As Integer] X As Single, Y As Single)

Remarks	The DropFile event uses these arguments.

Argument	Description

Index	Uniquely identifies a DDrop control if it is in a control array.

X,Y	Location of mouse pointer when files were dropped.


DropFileEnd Event

Syntax	Sub DDrop_DropFileEnd ([Index As Integer])

Remarks	The DropFile event uses these arguments.

Argument	Description

Index	Uniquely identifies a DDrop control if it is in a control array.


Enabled Property

Description	Determines whether the container object can accept files.

Usage	[ddrop.]Enabled [ = boolean ]

Remarks	The Enabled property settings are:

Setting	Description

True	Allows the control to accept files and generate events.

False	Disables the control from accepting files.

Data Type	Integer (Boolean)


See Also...

DropFile	DropFileBegin	DropFileEnd


Drop File Example
DDrop Event Example

Example	The example illustrates the use of the DDrop control. The example is program that accepts

bitmap files dragged from the File Manager onto a picture control.  The DDrop control

displays the bitmap in the picture and adds the filename to a listbox.  A checkbox is used

to enable or disable the acceptance of bitmap files.

Sub Check1_Click ()

    If Check1.Value <> 0 Then

        DDrop1.Enabled = True

    Else

        DDrop1.Enabled = False

    End If

End Sub

Sub DDrop1_DropFile (X As Single, Y As Single, Filename As String)

    Picture1.Picture = LoadPicture(Filename)

    List1.AddItem Filename

End Sub

Sub DDrop1_DropFileBegin (X As Single, Y As Single)

    List1.Clear

End Sub

Sub DDrop1_DropFileEnd ()

    List1.AddItem "Done"

End Sub


See Visual Basic Language Reference manual for description.


How DDrop Works
How to Use DDrop

The Windows File Manager can be used to drop files from its window to another

application.  DDrop is a control which allows VB container objects to accept files

dropped from the File Manager as well.

To add the file drag-and-drop feature to an application, place the DDrop object

inside the container object.  When the application is ran DDrop willl notify

Windows the container can receive files from the File Manager.

When files are dropped onto the container object three events are generated by

the DDrop control.


Registering DDrop

If you choose to register, you will receive the source and two versions of  DDrop, a developer's version, and a run-time-only version for distributing with your programs.  Neither version contains the "unregistered" pop-up.  Registration costs $20.

DDrop is listed in the CompuServe Shareware Registration Area.  The registration ID is 2150.  You may also register DDrop by mail.  To insure speedy delivery, print this topic and fill-in the form.  Personal checks and money orders are accepted.

(     )  Please send one copy of  DDrop.VBX  (Registered Version) .

Please write carefully, this section will be used as a mailing label.

Name:

Address:

City, State, and Zip:

Mail to:

Winefred Washington

14 Greenbrook Lane

Kingston, NY 12401